package com.ruoyi.supermarket.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.supermarket.mapper.SupermarketStaffMapper;
import com.ruoyi.supermarket.domain.SupermarketStaff;
import com.ruoyi.supermarket.service.ISupermarketStaffService;

/**
 * 超市员工详细信息Service业务层处理
 * 
 * @author faye
 * @date 2024-06-01
 */
@Service
public class SupermarketStaffServiceImpl implements ISupermarketStaffService 
{
    @Autowired
    private SupermarketStaffMapper supermarketStaffMapper;

    /**
     * 查询超市员工详细信息
     * 
     * @param id 超市员工详细信息主键
     * @return 超市员工详细信息
     */
    @Override
    public SupermarketStaff selectSupermarketStaffById(Long id)
    {
        return supermarketStaffMapper.selectSupermarketStaffById(id);
    }

    /**
     * 查询超市员工详细信息列表
     * 
     * @param supermarketStaff 超市员工详细信息
     * @return 超市员工详细信息
     */
    @Override
    public List<SupermarketStaff> selectSupermarketStaffList(SupermarketStaff supermarketStaff)
    {
        return supermarketStaffMapper.selectSupermarketStaffList(supermarketStaff);
    }

    /**
     * 新增超市员工详细信息
     * 
     * @param supermarketStaff 超市员工详细信息
     * @return 结果
     */
    @Override
    public int insertSupermarketStaff(SupermarketStaff supermarketStaff)
    {
        supermarketStaff.setCreateTime(DateUtils.getNowDate());
        return supermarketStaffMapper.insertSupermarketStaff(supermarketStaff);
    }

    /**
     * 修改超市员工详细信息
     * 
     * @param supermarketStaff 超市员工详细信息
     * @return 结果
     */
    @Override
    public int updateSupermarketStaff(SupermarketStaff supermarketStaff)
    {
        supermarketStaff.setUpdateTime(DateUtils.getNowDate());
        return supermarketStaffMapper.updateSupermarketStaff(supermarketStaff);
    }

    /**
     * 批量删除超市员工详细信息
     * 
     * @param ids 需要删除的超市员工详细信息主键
     * @return 结果
     */
    @Override
    public int deleteSupermarketStaffByIds(Long[] ids)
    {
        return supermarketStaffMapper.deleteSupermarketStaffByIds(ids);
    }

    /**
     * 删除超市员工详细信息信息
     * 
     * @param id 超市员工详细信息主键
     * @return 结果
     */
    @Override
    public int deleteSupermarketStaffById(Long id)
    {
        return supermarketStaffMapper.deleteSupermarketStaffById(id);
    }
}
